package request;

import java.util.LinkedList;

import record.ProjectRecord;

/**
 * RemoveProjectRequest is a class that is used to send a request to the server to remove a project record
 * from the database or hide it rather in order to not lose data.
 * @author Sean Freitag
 * @author Jacob Freemyer
 * @author Stephan Jossie
 *
 */
@SuppressWarnings("serial")
public class RemoveProjectRequest implements Request {
	/**
	 * Record to remove;
	 */
	private ProjectRecord record;
	
	/**
	 * List of all the project records
	 */
	private LinkedList<ProjectRecord> records;
	
	/**
	 * User to remove record from
	 */
	private String user;
	
	/**
	 * Creates a RemoveProjectRequest instance to remove a project from the database.
	 */
	public RemoveProjectRequest() {
	}

	/**
	 * Getter to get the project record being removed
	 * @return
	 * 		The record that is being removed.
	 */
	public ProjectRecord getRecord(){
		return record;
	}

	/**
	 * Setter to set the user to remove project from
	 * @param user
	 * The user
	 */
	public void setUser(String user) {
		this.user = user;
	}
	
	/**
	 * Getter to get the user that the project is being removed from
	 * @return
	 * Username
	 */
	public String getUser(){
		return user;
	}

	/**
	 * Set the project records array to the projects of the user
	 * @param projects
	 * the projects to add to this user
	 */
	public void setProjects(LinkedList<ProjectRecord> projects){
		this.records = projects;
	}
	
	/**
	 * Getter to get the projects associated with this user
	 * @return
	 * the projects
	 */
	public LinkedList<ProjectRecord> getProjects(){
		return records;
	}
	
	/**
	 * Setter for setting the project record being removed
	 * @param pRecord
	 * The record to remove
	 */
	public void setRecord(ProjectRecord pRecord)
	{
		record = pRecord;
	}
	
}
